﻿<Window x:Class="ColorConvert.MainWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
		Title="ColorConvert" Height="370" Width="300" ResizeMode="NoResize" Topmost="True" Background="#FFF0F0F0" FontFamily="Segoe WP">
	<Grid>
		<TabControl Background="#FFF0F0F0">
			<TabItem Header="Converter" Width="{Binding tabWidth}">
				<StackPanel>
					<GroupBox Header="Hex (Hexadecimal)" Height="57" VerticalAlignment="Top" Margin="5,0,5,5" BorderBrush="#FFA0A0A0">
						<Grid Margin="5">
							<xctk:WatermarkTextBox Watermark="Example: #FFFFFF" VerticalAlignment="Top" Name="HexInput" KeyDown="HexInput_KeyDown" GotFocus="HexInput_GotFocus"></xctk:WatermarkTextBox>
						</Grid>
					</GroupBox>

					<GroupBox Header="RGB (Decimal)" Height="97" VerticalAlignment="Bottom" Margin="5,4,5,5" BorderBrush="#FFA0A0A0">
						<Grid Margin="5">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="*" />
								<ColumnDefinition Width="*" />
								<ColumnDefinition Width="*" />
							</Grid.ColumnDefinitions>
							<Grid.RowDefinitions>
								<RowDefinition Height="30" />
								<RowDefinition Height="*" />
							</Grid.RowDefinitions>
							<Label Grid.Column="0" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Top">Red</Label>
							<Label Grid.Column="1" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Top">Green</Label>
							<Label Grid.Column="2" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Top">Blue</Label>
							<xctk:WatermarkTextBox Grid.Column="0" Grid.Row="1" Watermark="Ex: 255" VerticalAlignment="Top" Margin="5" Name="RInput" KeyDown="RInput_KeyDown" GotFocus="RInput_GotFocus"></xctk:WatermarkTextBox>
							<xctk:WatermarkTextBox Grid.Column="1" Grid.Row="1" Watermark="Ex: 255" VerticalAlignment="Top" Margin="5" Name="GInput" KeyDown="GInput_KeyDown" GotFocus="GInput_GotFocus"></xctk:WatermarkTextBox>
							<xctk:WatermarkTextBox Grid.Column="2" Grid.Row="1" Watermark="Ex: 255" VerticalAlignment="Top" Margin="5" Name="BInput" KeyDown="BInput_KeyDown" GotFocus="BInput_GotFocus"></xctk:WatermarkTextBox>
						</Grid>
					</GroupBox>

					<GroupBox Header="RGB (Divided)" Height="97" VerticalAlignment="Bottom" Margin="5,4,5,5" BorderBrush="#FFA0A0A0">
						<Grid Margin="5">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="*" />
								<ColumnDefinition Width="*" />
								<ColumnDefinition Width="*" />
							</Grid.ColumnDefinitions>
							<Grid.RowDefinitions>
								<RowDefinition Height="30" />
								<RowDefinition Height="*" />
							</Grid.RowDefinitions>
							<Label Grid.Column="0" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Top">Red</Label>
							<Label Grid.Column="1" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Top">Green</Label>
							<Label Grid.Column="2" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Top">Blue</Label>
							<xctk:WatermarkTextBox Grid.Column="0" Grid.Row="1" Watermark="Ex: 255" VerticalAlignment="Top" Margin="5" Name="RInput2" KeyDown="RInput2_KeyDown" GotFocus="RInput2_GotFocus"></xctk:WatermarkTextBox>
							<xctk:WatermarkTextBox Grid.Column="1" Grid.Row="1" Watermark="Ex: 255" VerticalAlignment="Top" Margin="5" Name="GInput2" KeyDown="GInput2_KeyDown" GotFocus="GInput2_GotFocus"></xctk:WatermarkTextBox>
							<xctk:WatermarkTextBox Grid.Column="2" Grid.Row="1" Watermark="Ex: 255" VerticalAlignment="Top" Margin="5" Name="BInput2" KeyDown="BInput2_KeyDown" GotFocus="BInput2_GotFocus"></xctk:WatermarkTextBox>
						</Grid>
					</GroupBox>
					<Button Margin="5" Name="ClearAll" Click="ClearAll_Click">Clear All</Button>
				</StackPanel>
			</TabItem>
			<TabItem Header="About" Width="{Binding tabWidth}">
				<StackPanel Margin="10">
					<Label Name="AboutProductTitle" Foreground="#FF107C10" FontWeight="Bold" FontSize="18" HorizontalAlignment="Center"/>
					<Label FontStyle="Italic" HorizontalAlignment="Center" Margin="0,0,0,5">Developed by Kyle Briggs for Don Briggs Ltd</Label>
					<Separator/>
					<TextBlock TextWrapping="WrapWithOverflow" HorizontalAlignment="Center" Margin="0,10,0,5">Currently in it's alpha stages, ColorConvert is a companion tool for graphics artists and designers allowing the user to quickly convert between the 3 main color types: Hex, RGB and RGB Decimalised.</TextBlock>
					<TextBlock TextWrapping="WrapWithOverflow" VerticalAlignment="Bottom" Margin="0,5,0,0">If you experience anything unusual or unexpected you deem to be a bug, or ColorConvert is conflicting with another application, please contact us.</TextBlock>
					<TextBlock Margin="0,4,0,5">ColorConvert "Recycle" logo from icons8.com</TextBlock>
					<TextBlock FontStyle="Italic" HorizontalAlignment="Center" Margin="0,4,0,5">Copyright<TextBlock  Text="©" /> 2016 - Kyle Briggs &amp; Don Briggs Ltd.</TextBlock>
				</StackPanel>
			</TabItem>
			<TabItem Header="Help" Width="{Binding tabWidth}">
				<StackPanel Margin="0,10,0,0">
					<Label Foreground="#FF107C10" FontWeight="Bold" FontSize="18" HorizontalAlignment="Center">Help</Label>
					<ScrollViewer HorizontalAlignment="Left" VerticalAlignment="Top" Height="255">
						<StackPanel Margin="10,10,10,0">
							<Label HorizontalAlignment="Center" Margin="0,0,0,5">Basic instructions to help you get started.</Label>
							<Separator/>
							<Label FontFamily="Segoe UI Semibold">Don't use negative numbers!</Label>
							<TextBlock TextWrapping="WrapWithOverflow" HorizontalAlignment="Center" Margin="0,10,0,5">This is something that will not be an issue in later versions as they come out, but at the moment, we do not have safety checks for negative numbers in the RGB or RGB Decimalised input fields, and inputting negative numbers will cause unusual and incorrect results.</TextBlock>
							
							<TextBlock TextWrapping="WrapWithOverflow" HorizontalAlignment="Center" Margin="0,10,0,5" FontFamily="Segoe UI Semibold">Tip: You can enter a hex with or without the pound sign (#)</TextBlock>
							<TextBlock TextWrapping="WrapWithOverflow" HorizontalAlignment="Center" Margin="0,10,0,5">You don't need to add in the pound sign (#) if you didn't have one as we check for it and remove them anyway for conversion.</TextBlock>

							<TextBlock TextWrapping="WrapWithOverflow" HorizontalAlignment="Center" Margin="0,10,0,5" FontFamily="Segoe UI Semibold">What are decimalised RGB integers and why do you need them?</TextBlock>
							<TextBlock TextWrapping="WrapWithOverflow" HorizontalAlignment="Center" Margin="0,10,0,5">Admittedly, these are not too useful, but a few graphics programs including Allegorithmic<TextBlock  Text="™" /> Substance Painter use this method for color input.</TextBlock>
						</StackPanel>
					</ScrollViewer>
				</StackPanel>
			</TabItem>
		</TabControl>
	</Grid>
</Window>